package com.yanqu.xiuxian.config.elementalbonds.enums;

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

public enum ElementalBondsHonorMomentType {

    //成就
    MaximumPoints(20000, "最高积分"),
    CumulativeWins(20001, "累计获胜的pvp局数"),
    CumulativeFuHunNum(20002, "累计获得的符魂数量"),
    MaximumStreakWin(20003, "最多连胜局数"),
    OneGameScore(20004, "单局最高分数达到过{0}分", true, true),
    OneActiveScore(20005, "pvp中一次行动获得的最高分数", true, false),
    BattleTimes(20006, "累计参与pvp对局数量"),
    OneGameEliminateBlueCount(20007, "1局中累计消除最多的蓝色方块数量", true, true),
    OneGameUseCardTimes(20008, "1局中最多累计释放{0}次卡片", true, true),
    OneGameEliminateRedCount(20010, "单局中累计消除{0}个红色方块", true, true),
    // ------------------------------------------------
    //勋章
    //Collect_BattleWinTimes(10001, "达成{}多少场胜利"),
    // Collect_CumulativeFuHunNum(10002, "累计获得{0}个符魂"),
    //Collect_MaximumStreakWin(10003, "达成{0}连胜"),
    //Collect_OneGameScore(10004, "单局中累计达到{0}分"),
    // Collect_OneActiveScore(10005, "pvp中一次行动最高获得{0}分"),
    //Collect_OneGameEliminateBlueCount(10006, "单局中累计消除{0}个蓝色方块"),
    //Collect_OneGameUseSkillTimes(10007, "单局中累计释放{0}次技能"),
    Collect_CumulativeSendEmotion(20009, "累计发送{0}个表情"),
    // Collect_OneGameEliminateRedCount(10009, "单局中累计消除{0}个红色方块"),
    Collect_FriendPkTimes(20011, "使用好友模式进行{0}次对局"),
    Collect_SeasonBattleTimes(10013, "本赛季累计参与{0}场对战"),
    ;

    private final int type;
    private final String desc;
    private final boolean oneGame;
    private final boolean cumulative;

    ElementalBondsHonorMomentType(int type, String desc) {
        this.type = type;
        this.desc = desc;
        this.oneGame = false;
        this.cumulative = false;
    }

    ElementalBondsHonorMomentType(int type, String desc, boolean oneGame, boolean cumulative) {
        this.type = type;
        this.desc = desc;
        this.oneGame = oneGame;
        this.cumulative = cumulative;
    }

    public static Set<ElementalBondsHonorMomentType> getOneGameElementalBondsHonorMomentType() {
        return Arrays.stream(ElementalBondsHonorMomentType.values())
                .filter(ElementalBondsHonorMomentType::isOneGame)
                .collect(Collectors.toSet());
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public boolean isOneGame() {
        return oneGame;
    }

    public boolean isCumulative() {
        return cumulative;
    }

}
